home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
DOSNX20B.ARJ
/
QUICKREF.DOC
< prev
next >
Wrap
Text File
|
1992-05-29
|
14KB
|
608 lines
DOSNIX QUICK REFERENCE GUIDE
Copyr. 1991,1992 by G. Vrooman
All rights reserved.
GETTING STARTED:
If you have a hard drive, make a directory named C:\DOSNIX
and copy the DOSNIX files into it. To use DOSNIX from any
directory, you need the following statement in your AUTOEXEC.BAT
file:
PATH = C:;C:\DOSNIX
If you already have a path statement, add ;C:\DOSNIX to the
end of it. If you don't have an AUTOEXEC.BAT file, you can
make one with any handy text editor. The following line will
help you keep track of where you are on your hard drive:
PROMPT $P$G
This will make your current directory part of your prompt.
If you don't have a hard drive, you can make a bootable floppy
disk with COMMAND.COM, FORMAT.COM, PRINT.COM and any other MSDOS
utilities you need. Copy as many DOSNIX utilities as you can to
it and use it as a working disk.
DOSNIX OPTIONS:
Most DOSNIX commands have a simple format which can be enhanced
by the use of UNIX style option strings. The option string is always
the first argument after the command and usually begins with a "-".
See DOSNIX.DOC for the options available with each command.
If you are used to MSDOS switches and find this awkward you can
insert the following line in your AUTOEXEC.BAT file:
SET SWITCH=/ (No space before or after "=")
All commands except CHMOD and READ will recognize a "/" as an option
delimiter. If you don't use this feature, you can use slashes in
path names, as in UNIX, and they will be converted to back slashes.
INSTANT HELP:
DOSNIX.DOC has now been keyed for quick command searches and
a HELP.BAT file has been included. To obtain on-line help, type
"help" and the name of the subject with which you want help. In
addition, a brief summary of most commands can be obtained by typing
the name of the command followed by a "-?".
NOTE:
UNIX is a registered trademark of AT&T corporation
MSDOS is a registered trademark of Microsoft corporation
LIST OF DOSNIX COMMANDS
-------------------------------------------------------------------------------
APP append standard input to file(s).
CAT Copy text file(s) to standard output.
CHMOD Modify attribute(s) of file.
CLR Set screen foreground, background and border colors.
CP Copy file to new file or directory.
CPDIR Copy directory and all subdirectories. *
DB Delete all files except specified files.
EDC Easy Directory Change.
FFIND Find all copies of file in specified path.
GET Find all filenames containing specified string. *
LS List contents of directory.
MV Move file to new file or directory.
MVDIR Move directory and all subdirectories to new location.
READ Display text file in page format.
RM Remove file(s).
RN Rename file or directory.
SGREP Search files(s) for text. *
SPLIT Split a text file into smaller pieces. *
TEE Copy standard input to standard output and file(s).
TOLOWER Convert standard input to lower case.
TOUCH Modify file time and date.
TOUPPER Convert standard input to upper case.
* Enhanced version only.
CHANGING SCREEN COLORS: (ver. 0.93+)
clr gre Changes screen color
to green with black
background and border.
clr -b gre Changes screen color to
high intensity green with
black background and border.
clr blu whi Changes screen color to
blue with white background
and border.
clr -b whi blu whi Changes screen color to
high intensity white with
blue background and white
border.
clr bla whi Changes screen color to
black on white. (reverse
video)
clr Clears screen without
resetting color attributes.
Other colors: red, cya, mag, yel, amb
Hint: Try "clr yel amb". This combination is pleasing and won't
singe your eyeballs like some combinations.
ANSI.SYS:
ANSI.SYS is the MSDOS graphics device driver. With ANSI.SYS, you
can use CLS to clear the screen without losing your colors. It is
also required with many communications programs to view ANSI graphics
on bulletin boards. To install ANSI.SYS, copy it to the root directory
of your boot drive and add the following line to CONFIG.SYS:
device = ansi.sys
LISTING FILES:
ls Lists all files in
current directory in
five column format.
ls -l Lists all files in
long format like
DOS DIR command.
ls -lt Lists all files in
long format, sorted
by date, oldest files
first.
ls -lrt Lists all files in
long format, most
recent files first.
ls -le Lists all files in
long format, sorted
by extension.
ls \ Lists all files in
root directory.
ls c:\cshow lists all files in
C:\CSHOW
ls . \ c:\dosnix Lists all files in current
directory, root directory
and C:\DOSNIX
ls *.txt Lists all files in current
directory with an extension
of .TXT
LOCATING FILES:
ffind calvin.gif Searches current drive for
all copies of CALVIN.GIF.
ffind c: calvin.gif Searches drive C: for all
copies of CALVIN.GIF.
ffind *: wyeth.gif Searches all hard drives for
all copies of WYETH.GIF.
ffind -f *: wyeth.gif Searches all available drives
for all copies of WYETH.GIF.
ffind -r *.bak Locates and removes all
files with an extension
of .BAK on current drive.
ffind -i *: *.bak Searches all drives for
.BAK files and allows you
choose which ones to delete.
ffind -l list.txt Locates all copies of LIST.TXT
and displays attribute, size,
date and time.
ffind -m c: *.* Finds all files on drive C:
and displays totals for each
subdirectory.
CHANGING DIRECTORIES:
cd \pcplus\downlds\utils Changes directory to
edc util \PCPLUS\DOWNLDS\UTILS
cd d:\downlds\graphics\gif Changes directory to
edc d:gif D:\DOWNLDS\GRAPHICS\GIF
edc -s Scans current drive and
stores PATH.EDC in root
directory.
edc -s d:gif Scans drive D, stores copy
of PATH.EDC in D:\ and
changes directory to
D:\DOWNLDS\GRAPHICS\GIF
edc -t Displays directory tree
while scanning.
edc -l Displays a list of directories.
COPYING FILES:
cp dosnix.doc dosnix.bak Copies DOSNIX.DOC to
DOSNIX.BAK.
cp dosnix.doc \tempdir Copies DOSNIX.DOC to
\TEMPDIR.
cp *.* \tempdir Copies all files in
cp . \tempdir current directory to
\TEMPDIR.
cp oldir newdir Copies all files in
OLDIR to NEWDIR.
cp -i tempdir a:\ Lists all files in
TEMPDIR and allows
you to choose which
ones to copy to A:\
cp -m ted.asm \assmblr a:\source Copies TED.ASM to \ASSMBLR
and A:\SOURCE.
cp -bco c:\text a:\ Copies only archive files in
C:\TEXT, clears archive bit
and overwrites any previously
existing files in A:\ .
MOVING FILES:
mv dosnix.bak dosnix.doc Moves DOSNIX.BAK to
rn dosnix.bak dosnix.doc DOSNIX.DOC.
mv dosnix.doc \DOC If \DOC is an existing
rn dosnix.doc \DOC directory, moves DOSNIX.DOC
to \DOC\DOSNIX.DOC, otherwise
moves DOSNIX.DOC to a file
named \DOC .
mv *.* \tempdir moves all files in current
mv . \tempdir directory to \TEMPDIR.
mv oldir newdir Moves all files in OLDIR
to NEWDIR.
mv -i tempdir a:\ Lists all files in
TEMPDIR and allows
you to choose which
ones to move to A:\
MOVING DIRECTORIES:
mvdir oldir newdir Renames OLDIR to NEWDIR.
rn oldir newdir
mvdir \text \vde\text Moves \TEXT to \VDE\TEXT
mvdir c:\stuff a:\stuff Moves C:\STUFF to A:\STUFF.
If a disk full error occurs
leaves C:\STUFF intact.
mvdir c:\basic c:\basic\source Generates error message.
REMOVING FILES:
rm dosnix.bak Removes DOSNIX.BAK
rm *.bak Removes all .BAK files
in current directory.
rm -i *.* Displays all files in
current directory and
allows you to choose
which ones to delete.
rm tempdir\*.* Removes all files in
TEMPDIR but leaves
directory.
rm -r tempdir Removes TEMPDIR along
with all files and sub-
directories.
rm -r a:\ Removes all files and
directories on drive A:
db dosnix94.zip Deletes all files in
current directory except
DOSNIX94.ZIP.
db *.c *.exe Deletes all files except
.C and .EXE files.
MODIFYING FILE ATTRIBUTES AND TIMES:
touch dosnix.doc Changes time and date of
DOSNIX.DOC to current DOS
time and date.
touch *.* Changes time and date of
all files in directory to
current DOS time and date.
touch -t ted.com TOUCH will prompt you
for a time and date
before modifying TED.COM.
touch -t 07/04/91;16:30:00 test.txt Changes time and date of
TEST.TXT to 4:30 PM, July 4,
1991.
chmod -a *.* Removes those pesky archive
bits from all files in the
current directory.
chmod +a records.txt Restores the archive bit to
RECORDS.TXT, to remind you
that you haven't backed it up.
chmod +r homework.txt Makes HOMEWORK.TXT a read
only file so your kid brother
won't erase it by mistake.
chmod +h vanna.gif Hides VANNA.GIF so your wife
or boss won't see it.
USING CAT, APP and TEE
cat > test.txt Copies whatever is typed
on the keyboard to TEST.TXT.
Use CTRL-Z to quit.
cat whats.new dosnix.doc Writes WHATS.NEW and
DOSNIX.DOC to screen.
cat whats.new dosnix.doc > docs.txt Concatenates WHATS.NEW
and DOSNIX.DOC and stores
them in DOCS.TXT.
cat *.c > csource.txt Concatenates all files with
an extension of .C and
stores them in CSOURCE.TXT.
cat newutil.c | app csource.txt Appends NEWUTIL.C to
app < newutil.c csource.txt CSOURCE.TXT.
app < newutil.c > csource.txt Totally destroys CSOURCE.TXT.
cat newutil.c >> csource.txt Appends NEWUTIL.C to
CSOURCE.TXT but leaves
a CTRL-Z between the two
files.
cat *.c | tee csource.txt Concatenates all files with
an extension of .C and stores
them in CSOURCE.TXT while
writing them to the screen.
cat *.c | tee csource.txt | read Same as above except pipes
screen output to READ.
USING READ (ver. 0.94f+)
read Reads from STDIN. Not
very useful by itself.
If you get stuck in this
mode type CTRL-Z to get
out.
read dosnix.doc Displays contents of
DOSNIX.DOC.
read whats.new dosnix.doc Displays contents of
WHATS.NEW and DOSNIX.DOC.
read *.doc Displays contents of all
files with an extension
of .DOC .
KEYPAD COMMANDS:
PgDn Clears screen and displays
next page.
PgUp Clears screen and displays
previous page.
Down Arrow Displays next line.
Up Arrow Moves back one line.
Right Arrow Shifts screen one tab stop
right.
Left Arrow Shifts screen one tab stop left.
Home, ^PgUp Moves to beginning of file.
End, ^PgDn Moves to end of file.
UNIX COMMANDS:
<space> Scrolls until spacebar is
pressed again. (Not quite
UNIX).
^D, D Displays next half page of text.
Enter Displays next line of text.
^U, U Moves back one half page.
^B, B Clears screen and displays
previous page.
H Displays help page.
^L, . Rewrites current page.
$ Moves to end of file.
N Moves to next file.
Q Terminates the program.
NOTE: ^ stands for Ctrl key.
NUMERIC AND SEARCH COMMANDS:
-100 Moves back 100 lines.
+100 Moves forward 100 lines.
100 Moves to line number 100.
\CHMOD Searches text for first
occurrence of "CHMOD".
/ Searches text for next
occurrence of "CHMOD".
ALTERNATE KEYS:
F1, Backspace H, Display help screen.
F10, Del Escape
[ ^U, Move back one half page.
] ^D, Move down one half page.
NOTE: READ will maintain whatever color attribute is present when you run
it. This means you can set your screen colors with CLR and then
use READ to view text files in whatever color you like. READ will
determine appropriate highlight and menu bar colors.